﻿using System;
using Ninject.Core;
using Example.Common.Presenters;
using Moq;
using Example.Common.Services;

namespace TestProject1
{
    public class MoqModule : StandardModule
    {
        private static Mock<HelloWorldService> _helloWorldService = null;
        public static Mock<HelloWorldService> HelloWorldService
        {
            get
            {
                if (_helloWorldService == null)
                    _helloWorldService = new Mock<HelloWorldService>();
                return _helloWorldService;
            }
        }

        public override void Load()
        {
            Bind<HelloWorldPresenter>().ToSelf();
            Bind<HelloWorldService>().ToConstant(HelloWorldService.Object);
        }
    }
}
